<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Block</title>
</head>

<body>
<?php
include("../connection/connection.php");
include("reportFunctions.php");
$distId=$_REQUEST['distId'];
$sqlReport = "SELECT distinct `district_id`,`district_name`,`block_id`,`block_name` FROM `tbl_lookup_location` where `district_id` = ".$distId." group by `block_id`";
$queryReport = mysql_query($sqlReport);

?>
<table border="0" width="800" cellspacing="0" cellpadding="0">
	<tr>
		<td bgcolor="#E9E9E9" height="26">
		<p align="center">
		<font face="Verdana" style="font-size: 9pt; font-weight: 700" color="#224568">
		Block wise percentage of handpumps with seasonal fluctuation in yield (as per PHED)</font></td>
	</tr>
	<tr>
	  <td bgcolor="#E9E9E9" height="26"><div align="center"><font face="Verdana" style="font-size: 9pt; font-weight: 700" color="#224568">Table 23</font> </div></td>
  </tr>
	<tr>
		<td bgcolor="#E9E9E9" height="56">
		<table border="1" width="800" cellspacing="0" cellpadding="0" height="49" bgcolor="#C5D8EB">
			<tr>
				<td width="92" rowspan="2" align="center">
				<p align="center"><font face="Verdana" style="font-size: 8.5pt">
			  District</font></td>
				<td width="119" rowspan="2" align="center">
				<p align="center"><font face="Verdana" style="font-size: 8.5pt">
			  Block</font></td>
				<td width="117" rowspan="2" align="center">
				<font face="Verdana" style="font-size: 8.5pt">
				Functional</font></td>
				<td colspan="3" align="center">
				<p align="center"><font face="Verdana" style="font-size: 8.5pt">
				Seasonal Variation</font></td>
				<td colspan="3" align="center">
				<p align="center"><font face="Verdana" style="font-size: 8.5pt">
				Percentage</font></td>
			</tr>
			<tr>
				<td align="center" width="95">
				<font style="font-size: 8.5pt" face="Verdana">No Change</font></td>
				<td align="center" width="73">
				<font style="font-size: 8.5pt" face="Verdana">Slight</font></td>
				<td align="center" width="65">
				<font style="font-size: 8.5pt" face="Verdana">Drastic</font></td>
				
			
				<td align="center" width="76">
				<font style="font-size: 8.5pt" face="Verdana">No Change</font></td>
				<td align="center" width="73">
				<font style="font-size: 8.5pt" face="Verdana">Slight</font></td>
				<td align="center" width="70">
				<font style="font-size: 8.5pt" face="Verdana">Drastic</font></td>
			</tr>
		</table>		</td>
	</tr>
	<tr>
		<td>
		<table border="1" width="800" cellspacing="0" cellpadding="0" height="49" bordercolor="#C5D8EB" style="border: 1px solid #BBD1E8" bgcolor="#F9F9F9">
			<?php
			//$numVillage=0;
			//$numFormVill=0;
			while($rowReport = mysql_fetch_array($queryReport)) {
			?></font><tr>
				<td width='93' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo $rowReport['district_name']; ?></font></td>
				<td width='119' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo $rowReport['block_name']; ?></font></td>
				<td width='116' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getFunctionalStatusNoBlockWise($distId,'FUNCTIONAL',$rowReport['block_id']); ?></font></td>
				<td width='96' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getSeasonalFluctuationNoBlockWise($distId,'No Change',$rowReport['block_id']); ?></font></td>
				<td width='74' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getSeasonalFluctuationNoBlockWise($distId,'Slight Change',$rowReport['block_id']); ?></font></td>
				<td width='64' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getSeasonalFluctuationNoBlockWise($distId,'Drastic Change',$rowReport['block_id']); ?></font></td>
				
				<td width='77' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo percentSeasonalFluctuationBlockWise($distId,'FUNCTIONAL','No Change',$rowReport['block_id']); ?></font></td>
				<td align='center' width='73'><font face="Verdana" style="font-size: 8.5pt"><?php echo percentSeasonalFluctuationBlockWise($distId,'FUNCTIONAL','Slight Change',$rowReport['block_id']); ?></font></td>
				<td align='center' width='68'><font face="Verdana" style="font-size: 8.5pt"><?php echo percentSeasonalFluctuationBlockWise($distId,'FUNCTIONAL','Drastic Change',$rowReport['block_id']); ?></font></td>
				
			</tr>
			<?php
			//$numVillage+=$rowReport['NumVill'];
			//$numFormVill+=$numFormVillage;
			}
			?>
			<tr bgcolor="#E9E9E9"><td colspan="2" align='center'><font face="Verdana" style="font-size: 8.5pt">Total</font></td>
			
				<td width='116' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getFunctionalStatusNoDistWise($distId,'FUNCTIONAL'); ?></font></td>
				<td width='96' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getSeasonalFluctuationNoDistWise($distId,'No Change'); ?></font></td>
				<td width='74' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getSeasonalFluctuationNoDistWise($distId,'Slight Change'); ?></font></td>
				<td width='64' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo getSeasonalFluctuationNoDistWise($distId,'Drastic Change'); ?></font></td>
				<td width='77' align='center'><font face="Verdana" style="font-size: 8.5pt"><?php echo percentSeasonalFluctuationDistWise($distId,'FUNCTIONAL','No Change'); ?></font></td>
				<td align='center' width='73'><font face="Verdana" style="font-size: 8.5pt"><?php echo percentSeasonalFluctuationDistWise($distId,'FUNCTIONAL','Slight Change'); ?></font></td>
				<td align='center' width='68'><font face="Verdana" style="font-size: 8.5pt"><?php echo percentSeasonalFluctuationDistWise($distId,'FUNCTIONAL','Drastic Change'); ?></font></td>
			</tr>
		</table>		</td>
	</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>



</body>

</html>
